<!doctype html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="Generator" content="EditPlus®">
    <meta name="Author" content="AK">
    <meta name="Keywords" content="WEB,IT,前端">
    <meta name="Description" content="">
    <meta http-equiv="Cache-Control" content="max-age-0">
    <meta http-equiv="refresh" content="555">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <link rel="icon" href="/mylogo32.ico">
    <link rel="stylesheet" type="text/css" href="/bootstrap-v3.3.7/dist/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/jquery-ui/css/jquery-ui.css">
    <link rel="stylesheet" href="/layui-v2.2.6/layui/css/layui.css">
    <link rel="stylesheet" href="/common.css">
    <!-- [if lt IE 9] -->
    <script type="text/javascript" src="/html5shiv.min.js"></script>
    <script type="text/javascript" src="/respond.min.js"></script>
    <!-- [endif] -->
    <!-- http://www.huangyun.xyz -->
    <style type="text/css">
    #body1 {
        background: #ffffff;
        color: #f00;
    }
    </style>
    <title> AK </title>
</head>

<body id="body1" onfocus="changeBgColorClk1()">
    <div id="localtime"></div>
    <div id="app">
        <router-view></router-view>
    </div>
    <script type="text/javascript" src="/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="/bootstrap-v2.3.2/js/bootstrap.js"></script>
    <script type="text/javascript" src="/jquery-ui/js/jquery-ui.js"></script>
    <script src="/layui-v2.2.6/layui/layui.js"></script>
    <script type="text/javascript" src="/vuejs/vue-v2.5.16.js"></script>
    <script type="text/javascript" src="/vuejs/vue-router.js"></script>
    <script src="https://cdn.bootcss.com/vue-resource/1.5.0/vue-resource.js"></script>
    <script type="text/javascript" src="/less.js-2.5.3/dist/less.js"></script>
    <script type="text/javascript" src="/AK.js"></script>
    <script>
    var BuyComp = Vue.component("buy", {
        template: `<div>
        	<button @click="goLast">去结算</button>
        </div>`,
        methods: {
            goLast: function() {
                this.$router.push("/last/500")
            }
        }
    })
    var LastComp = Vue.component("last", {
        data: function() {
            return {
                price: 0
            }
        },
        template: `<div>
    			<h3>商品的遇终价格为：{{price}}</h3>
    			<router-link to="/rcv">发货地址</router-link>
    			<router-link to="/fp">发票信息</router-link>
    			<router-view></router-view>
    		</div>`,
        mounted: function() {
            var res = this.$route.params.price
            console.log(res)
            this.price = res
        }
    });
    var RcvComp = Vue.component("rcv", {
        template: `<div>
    			<h3>这是收货地址</h3>
    		</div>`
    })
    var FpComp = Vue.component("fp", {
        template: `<div>
    			<h3>这是发票信息</h3>
    		</div>`
    })
    var Page404Comp = Vue.component("page404", {
        template: `<div>
                <h3>404了</h3>
            </div>`
    })
    var router = new VueRouter({
        routes: [{
            path: "/",
            redirect: "/buy"
        }, {
            path: "/buy",
            component: BuyComp
        }, {
            path: "/last/:price",
            component: LastComp,
            children: [{
                path: "/rcv",
                component: RcvComp
            }, {
                path: '/fp',
                component: FpComp
            },{
                path:"*",
                component:Page404Comp
            }]
        }]
    })
    new Vue({
        el: "#app",
        data: {
            msg: "Hello"
        },
        router
    })
    </script>
    <script>
    showtime();
    changeBgColor();
    </script>
</body>

</html>